<template >
  <div id="more">更多信息！
    <button @click="getHello1">点击请求后端获取时间</button>
    <button @click="getData">点击请求后端数据库</button>
    <div>{{hello}}</div>
    <div v-for="item in ccma" :key="item.id">
      <div> {{item.id}}---{{item.category}}---{{item.parameterName}}---{{item.remarks}}---{{item.standardMethod}}</div>
    </div>
  </div>
</template>

<script>
import {getHello,getccma} from "@/api/test"
export default {
  data() {
    return {
      hello: "",
      ccma: []
    }
  },
  methods: {
    async getHello1() {
      console.log("  111")
      await getHello().then(res => {
        this.hello = res
        console.log(res)
      })
    },
    async getData() {
      console.log("  222")
      await getccma().then(res => {
        this.ccma = res.data
      })
    }
  }
}
</script>

<style scoped>
#more {
    color: bisque;
}
</style>